.class Lrexsee/storage/RexseeDatabase$1;
.super Lrexsee/core/browser/clazz/ExtensionListener;
.source "RexseeDatabase.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/storage/RexseeDatabase;-><init>(Lrexsee/core/browser/Browser;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/storage/RexseeDatabase;


# direct methods
.method constructor <init>(Lrexsee/storage/RexseeDatabase;[Ljava/lang/String;)V
    .locals 0
    .param p2, "$anonymous0"    # [Ljava/lang/String;

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/storage/RexseeDatabase$1;->this$0:Lrexsee/storage/RexseeDatabase;

    .line 50
    invoke-direct {p0, p2}, Lrexsee/core/browser/clazz/ExtensionListener;-><init>([Ljava/lang/String;)V

    return-void
.end method


# virtual methods
.method public run(Landroid/content/Context;Lrexsee/core/browser/Browser;Ljava/lang/String;)V
    .locals 6
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "browser"    # Lrexsee/core/browser/Browser;
    .param p3, "url"    # Ljava/lang/String;

    .prologue
    .line 65
    invoke-static {p3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    .line 66
    .local v2, "uri":Landroid/net/Uri;
    invoke-virtual {v2}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v1

    .line 67
    .local v1, "scheme":Ljava/lang/String;
    if-eqz v1, :cond_0

    const-string v3, "file"

    invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_1

    .line 68
    :cond_0
    iget-object v3, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    const-string v4, "Can\'t process .db file online."

    invoke-virtual {v3, v4}, Lrexsee/core/application/RexseeApplication;->error(Ljava/lang/String;)V

    .line 81
    :goto_0
    return-void

    .line 71
    :cond_1
    new-instance v0, Ljava/io/File;

    invoke-virtual {v2}, Landroid/net/Uri;->getSchemeSpecificPart()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v0, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 72
    .local v0, "file":Ljava/io/File;
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v3

    if-nez v3, :cond_2

    .line 73
    iget-object v3, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "File "

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, " not found."

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Lrexsee/core/application/RexseeApplication;->error(Ljava/lang/String;)V

    goto :goto_0

    .line 76
    :cond_2
    invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z

    move-result v3

    if-eqz v3, :cond_3

    .line 77
    iget-object v3, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    const-string v4, "The .db file is a directory."

    invoke-virtual {v3, v4}, Lrexsee/core/application/RexseeApplication;->error(Ljava/lang/String;)V

    goto :goto_0

    .line 80
    :cond_3
    iget-object v3, p2, Lrexsee/core/browser/Browser;->function:Lrexsee/core/browser/RexseeBrowser;

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "database://"

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Lrexsee/core/browser/RexseeBrowser;->go(Ljava/lang/String;)V

    goto :goto_0
.end method

.method public shouldAddToHistory()Z
    .locals 1

    .prologue
    .line 61
    const/4 v0, 0x0

    return v0
.end method

.method public shouldProcessLocal()Z
    .locals 1

    .prologue
    .line 57
    const/4 v0, 0x1

    return v0
.end method

.method public shouldProcessOnline()Z
    .locals 1

    .prologue
    .line 53
    const/4 v0, 0x0

    return v0
.end method
